package com.mida.bms.report.api;

import com.mida.bms.report.entity.DocStructTemplateInfo;
import com.mida.bms.report.vo.DocStructTemplateAuthBatchVo;
import com.mida.bms.report.vo.DocStructTemplateInfoVo;
import com.mida.bms.report.vo.PageResultVo;
import com.mida.tool.common.result.ActionResult;
import com.mida.tool.common.result.ListResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.DependsOn;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author ：dj
 * @description：模版基本信息
 */
@DependsOn("loadFromDatabasePropertyConfig")
@FeignClient(name = "docStructTemplateInfoApi",url = "bms.report.feign.url")
public interface DocStructTemplateInfoApi {

    /**
     * 添加模版基本信息
     * @param docStructTemplateInfoVo
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/addDocStructTemplateInfo",consumes = {"application/json"})
    @ResponseBody
    public ActionResult addDocStructTemplateInfo(@RequestBody DocStructTemplateInfoVo docStructTemplateInfoVo);

    /**
     * 修改模版数据
     *
     * @param docStructTemplateInfoVo 对象接收前端传入的json
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/updateDocStructTemplateInfo",consumes = {"application/json"})
    @ResponseBody
    public ActionResult updateDocStructTemplateInfo(@RequestBody DocStructTemplateInfoVo docStructTemplateInfoVo);

    /**
     * 删除模版数据
     *
     * @param stTemplateInfoSoid 对象接收前端传入的json
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/deleteDocStructTemplateInfo",consumes = {"application/json"})
    @ResponseBody
    public ActionResult deleteDocStructTemplateInfo(@RequestBody Long stTemplateInfoSoid);

    /**
     * 查询模板分页列表处理
     *
     * @param docStructTemplateInfoVo 对象接收前端传入的json
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/getDocStructTemplateInfoPage",consumes = {"application/json"})
    public ListResult<PageResultVo<DocStructTemplateInfo>> getDocStructTemplateInfoPage(
            @RequestBody DocStructTemplateInfoVo docStructTemplateInfoVo);

    /**
     * 根据模板soid查询模版数据
     *
     * @param stTemplateInfoSoid 对象接收前端传入的json
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/getDocStructTemplateInfo", consumes = {"application/json"})
    @ResponseBody
    public ListResult getDocStructTemplateInfo(@RequestBody Long stTemplateInfoSoid);


    /**
     * 查询可授权模板列表分页列表处理
     *
     * @param docStructTemplateAuthBatchVo 对象接收前端传入的json
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/getAuthSpaceDocStructTemplateInfoPage",consumes = {"application/json"})
    ListResult<PageResultVo<DocStructTemplateInfo>> getAuthSpaceDocStructTemplateInfoPage(
            @RequestBody DocStructTemplateAuthBatchVo docStructTemplateAuthBatchVo);

    /**
     * 查询可授权模板处理
     *
     * @param docStructTemplateAuthBatchVo 对象接收前端传入的json
     * @return
     */
    @PostMapping(value = "/docStructTemplateInfo/getAuthSpaceDocStructTemplateInfoList",consumes = {"application/json"})
    @ResponseBody
    ListResult<List<DocStructTemplateInfo>> getAuthSpaceDocStructTemplateInfoList(
            @RequestBody DocStructTemplateAuthBatchVo docStructTemplateAuthBatchVo);
}
